Interface sjl.Iterator
All Packages Class Hierarchy This Package Previous Next Index
Interface sjl.Iterator
- public interface Iterator
- extends Object
The mininum interface that all iterators have in common.
It servers as a generic type place holder while the iterator is being
passed around.
Copyright © 1996 Finn Bock
- See Also:
- InputIterator, OutputIterator, ForwardIterator, BidirectionalIterator, RandomIterator, Iter
-
cmp(Iterator)
- Compare self with another Iterator.
-
genericCopy()
- Return a copy of myself.
-
next()
- Advance self to the next element in the container.
next
public abstract Iterator next()
- Advance self to the next element in the container.
- Returns:
- self
cmp
public abstract boolean cmp(Iterator i)
- Compare self with another Iterator.
This method is implemented in the concrete iterator classes.
- Parameters:
- i - the iterator to compare with.
- Returns:
- true if the two iterators are equal (points to the same place).
genericCopy
public abstract Iterator genericCopy()
- Return a copy of myself. This copy can then be manipulated.
- Returns:
- a copy of myself
All Packages Class Hierarchy This Package Previous Next Index